<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <title>区域列表</title>
    <asset:javascript src="fp.js"/>
</head>


<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>贷款管理系统</li>
                    <li class="active">
                        <span>区域</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                区域
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <filterpane:currentCriteria domainBean="District"
                                    dateFormat="${[title: 'MM/dd/yyyy', createdDate: 'yyyy-MM-dd', modifiedDate: 'yyyy-MM-dd']}"
                                    removeImgDir="images" removeImgFile="icon-no.png" fullAssociationPathFieldNames="no"
                                    filterPropertyValues="${[]}" class="filter-info alert alert-info"/>


        <div class="hpanel hgreen collapsed">
            <div class="panel-heading hbuilt">
                <div class="panel-tools">

                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                过滤条件
            </div>

            <div class="panel-body" style="padding: 10px 20px">
                <div class="paginateButtons">

                    <filterpane:filterButton text="条件过滤" appliedText="修改过滤条件" class="btn btn-info btn-xs"/>
                </div>
                <filterpane:filterPane domain="com.next.District"
                                       additionalProperties="identifier"
                                       associatedProperties="community.name,city.name,city.province.name,city.telephone"
                                       excludeProperties="cost"
                                       filterPropertyValues="${[createdDate: [years: 2020..2010, precision: 'month'], modifiedDate: [years: 2020..2010, precision: 'month']]}"
                                       titleKey="fp.tag.filterPane.titleText"
                                       dialog="true"
                                       visible="n"
                                       showSortPanel="n"
                                       showTitle="n"
                                       fullAssociationPathFieldNames="false"/>
            </div>

        </div>

        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:link action="create" class="btn btn-info btn-xs"><i class="fa fa-plus"></i>新建</g:link>
                </div>
                所有区域
            </div>

            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <g:sortableColumn property="id" title="ID" params="${filterParams}"/>
                            <g:sortableColumn property="name" title="名称" params="${filterParams}"/>
                            <g:sortableColumn property="code" title="编号" params="${filterParams}"/>
                            <g:sortableColumn property="daysOfOtherRights" title="出它项时间" params="${filterParams}"/>
                            <g:sortableColumn property="city" title="所属城市" params="${filterParams}"/>
                            <g:sortableColumn property="community" title="下属小区" params="${filterParams}"/>
                            <g:sortableColumn property="createdDate" title="创建时间" params="${filterParams}"/>
                            <g:sortableColumn property="modifiedDate" title="修改时间" params="${filterParams}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${districtList}" status="i" var="district">
                            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                                <td><g:link action="show"
                                            id="${district.id}">${district.id?.encodeAsHTML()}</g:link></td>
                                <td>${district.name?.encodeAsHTML()}</td>
                                <td>${district.code.encodeAsHTML()}</td>
                                <td>${district.daysOfOtherRights?.encodeAsHTML()}</td>
                                <td>${district.city?.encodeAsHTML()}</td>
                                <td><g:each in="${district.community}" var="community"><span
                                        class="label label-info">${community.name}</span>&nbsp;</g:each></td>
                                <td><g:formatDate date="${district.createdDate}" format="yyyy-MM-dd"/></td>
                                <td><g:formatDate date="${district.modifiedDate}" format="yyyy-MM-dd"/></td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="panel-footer">
                <div class="pagination">
                    <filterpane:paginate total="${districtTotal}" domainBean="com.next.District"/>
                </div>
            </div>
        </div>

    </div>

</div>

</body>
</html>
